﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Zoomtel.Auth.Mvc.Attributes;
using Zoomtel.Entity.BIZ;
using Zoomtel.Persist.BIZ.Models;
using Zoomtel.Service.BIZ;
using Zoomtel.Web.Controllers;

namespace Zoomtel.Web.Areas.BIZ.Controllers
{
    [Description("提现接口")]
    public class CashLogController : BizModuleController
    {
        private CashLogService _cashLogService;
        public CashLogController(CashLogService cashLogService)
        {
            _cashLogService = cashLogService;
        }

        [Page]
        [HttpGet]
        [Description("提现列表")]
        public IActionResult Index()
        {
            return View();
        }

        [HttpPost]
        [Description("查询")]
        public Task<IResultModel> Query(CashLogQueryModel model)
        {
            return _cashLogService.Query(model);
        }

        [HttpPut]
        [Description("更新")]
        public Task<IResultModel> Update(CashLogEntity model)
        {
            return _cashLogService.Update(model);
        }


        [HttpPost]
        [Description("打款")]
        public Task<IResultModel> Payment(CashLogEntity model)
        {
            return _cashLogService.Payment(model);
        }


        [HttpPost]
        [Description("审核")]
        public Task<IResultModel> Audit(string ids,string status)
        {
            return _cashLogService.Audit(ids,status);
        }
    }
}
